<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:62:"D:\wwwroot\cms\template/index_style/default/index/footmenu.htm";i:1609332796;}*/ ?>
<!--底部菜单-->
<link rel="stylesheet" href="/public/static/css/footmenu.css?f"> 

<?php if(defined('LABEL_DEBUG')): ?><!--QB <!--footermenu002	myform	--><?php if(is_array($__LIST__) || $__LIST__ instanceof \think\Collection || $__LIST__ instanceof \think\Paginator): $i = 0; $__LIST__ = $__LIST__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rs): $mod = ($i % 2 );++$i;?>
	<?php echo val($_cfg?:[]); endforeach; endif; else: echo "" ;endif; ?> QB--><?php endif; $footermenu002 = fun('label@run_label','footermenu002',['val'=>'','conf'=>'index_style/default/index/footmenu.php','list'=>'rs','systype'=>'myform','tpl'=>'','ifdata'=>1,'dirname'=>__FILE__,'rows'=>'5','class'=>'','order'=>'','by'=>'','where'=>'','whereor'=>'','sql'=>"",'js'=>'','cache_time'=>'0'  ]); if(defined('LABEL_SET')): ?><ul style="padding:10px;">修改底部菜单相关功能设置</ul><?php endif; if(val('pointbgcolor')!=''): ?><style type="text/css">.footmenu_warp .menu1.centers .bt-name em:first-child{ background:<?php echo val('pointbgcolor'); ?> }</style><?php endif; ?>

<!--重新定义底部菜单链接开始-->
<?php if(defined('LABEL_DEBUG')): ?><!--QB <!--footermenu001	links	-->
	<?php 
	$_menudb=[];
	foreach($listdb AS $key=>$rs){
		$vs=['name'=>$rs['title'],'style'=>$rs['icon'],'url'=>$rs['url'],'fontcolor'=>$rs['font_color'],'bgcolor'=>$rs['bgcolor'],];
		if($rs['tagid']&&is_numeric($rs['tagid'])){
			$rs['tagid'] = 'a'.$rs['tagid'];
		}
		if($rs['tagid']&&$_menudb[$rs['tagid']]){
			$_menudb[$rs['tagid']]['sons'][] = $vs;
		}else{
			$_menudb[$rs['tagid']?:$key] = $vs;
		}
	}
	$_menudb && val(['footlink'=>$_menudb],'footermenu');/*加个footermenu标志,避免跟上面的标签冲突*/
	 ?>
 QB--><?php endif; $footermenu001 = fun('label@run_hy','footermenu001',[  'hy_id'=>intval($info['id']&&defined('IN_QUN_PAGE')&&IN_QUN_PAGE===true?$info['id']:$hy_id),'hy_tags'=>$tags,'val'=>'listdb','conf'=>'','list'=>'rs','systype'=>'links','tpl'=>'','ifdata'=>1,'dirname'=>__FILE__,'rows'=>'5','class'=>'','order'=>'','by'=>'','where'=>'','whereor'=>'','sql'=>"",'js'=>'','cache_time'=>'0'  ]); if(defined('LABEL_SET')): ?><ul style="padding:10px;">重新定义底部菜单链接</ul><?php endif; ?>
<!--重新定义底部菜单链接结束-->

<?php 
$menu_choose=config('system_dirname')?:(ENTRANCE==='member'?'member':'index');
$menudb=val('footlink','footermenu')?:fun('page@foot_menu');
 ?>

<div class="footmenu_warp">
	<?php if(is_array($menudb) || $menudb instanceof \think\Collection || $menudb instanceof \think\Paginator): $k = 0;$__LIST__ = is_array($menudb) ? array_slice($menudb,0,5, true) : $menudb->slice(0,5, true); if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rs): $mod = ($k % 2 );++$k;?>
    <!-- 一级菜单开始 <?php if($rs['bgcolor']): ?>background-color:<?php echo $rs['bgcolor']; ?>;<?php endif; ?> -->
	<div class="menu1   <?php if((count($menudb)>4&&$k==3)||(count($menudb)==3&&$k==2)): ?> centers <?php endif; if(($rs['activate']==$menu_choose||$rs['activate']==$menu_choose.'-'.$fid)): ?> ck <?php endif; ?>">
        <div class="bt-name">
			<a href="<?php echo !empty($rs['sons'])?'javascript:;':$rs['url']; ?>" style="<?php if($rs['fontcolor']): ?>color:<?php echo $rs['fontcolor']; ?>;<?php endif; ?> ">
				<em class="iconimg <?php echo (isset($rs['style']) && ($rs['style'] !== '')?$rs['style']:'fa fa-leaf'); ?>" <?php if($rs['fontcolor']): ?>style="color:<?php echo $rs['fontcolor']; ?>"<?php endif; ?>></em>
				<em class="titles"><?php echo $rs['name']; ?></em>
			</a>
        </div>
        <?php if($rs['sons']): ?>
        <!-- 二级菜单开始 -->
        <div class="icons"></div>
        <div class="menu2" style="display: none;">
			<ul>
			<?php if(is_array($rs['sons']) || $rs['sons'] instanceof \think\Collection || $rs['sons'] instanceof \think\Paginator): $i = 0; $__LIST__ = $rs['sons'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vs): $mod = ($i % 2 );++$i;if(val('hidelay')&&val('hide2icon'))$vs['style']=''; ?>
				<li class="icon_li">
					<a href="<?php echo $vs['url']; ?>" class="<?php echo !empty($vs['style'])?'haveimg':'noimg'; ?>">
						<?php if($vs['style']): ?><em class="iconimg <?php echo $vs['style']; ?>"></em><?php endif; ?>
						<em class="titles"><?php echo $vs['name']; ?></em>
					</a>
				</li>
			<?php endforeach; endif; else: echo "" ;endif; ?>
			</ul>
			<div class="tiggle"></div>
			<div class="innertiggle"></div>
        </div> 
        <!-- 二级菜单结束 -->
        <?php endif; if(strstr($rs['url'],'member.php/member/msg/index')&&modules_config('tongji')): ?>
		<!-- 角标开始 -->
        <dd  style="color:#fff;background:orange;position:absolute;right:5px;top:2px;font-size:10px;line-height:12px;padding:2px 3px;border-radius:4px;display:none;" class="tongji-num">0</dd>
        <?php elseif(strstr($rs['url'],'member.php/member/index')): ?>
        <dd  style="color:#fff;background:red;position:absolute;right:5px;top:2px;font-size:10px;line-height:12px;padding:2px 3px;border-radius:4px;display:none;" class="msg-num">0</dd>
        <!-- 角标结束 -->
		<?php endif; ?>
    </div>
	<?php echo $rs['script']; ?>
	<!-- 一级菜单结束 -->
	<?php endforeach; endif; else: echo "" ;endif; ?>    
</div>



<!--弹窗开始-->
<?php if(!val('hidelay')): ?>
<div class="footer_tc_dc"></div>
<div class="footer_tc_show">
  <div class="shuoming">
    <?php echo val('title1')?:'随时随地交流，掌控身边动态！'; ?>
  </div>
  <?php if(defined('LABEL_DEBUG')): ?><!--QB <!--wap_ruzhu	text	-->
  <div class="ruzhu" onclick="window.location.href='<?php echo val('link1')?:murl('qun/content/add',['mid'=>1]); ?>'">
    <p><i class="<?php echo val('iconqun')?:'fa fa-asl-interpreting'; ?>"></i></p>
    <p>
        <span><?php echo val('title2')?:'创建属于自己的圈子！'; ?></span>
        <span><?php echo val('title3')?:'发现生活乐圈，绽放精彩人生'; ?></span>
    </p>
    <p><i class="fa fa-fw fa-angle-right"></i></p>
  </div>
   QB--><?php endif; $wap_ruzhu = fun('label@run_label','wap_ruzhu',['val'=>'','conf'=>'','list'=>'rs','systype'=>'text','tpl'=>'','ifdata'=>1,'dirname'=>__FILE__,'rows'=>'5','class'=>'','order'=>'','by'=>'','where'=>'','whereor'=>'','sql'=>"",'js'=>'','cache_time'=>'0'  ]); ?>
  <div class="fabu_title"><span>快捷菜单</span></div>
  <ul class="fabu_cd">
      <?php $_result=array_values($menudb)[count($menudb)>4?2:1]['sons'];if(is_array($_result) || $_result instanceof \think\Collection || $_result instanceof \think\Paginator): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rs): $mod = ($i % 2 );++$i;?>
	  <li>
	    <a href="<?php echo !empty($rs['sons'])?'javascript:;':$rs['url']; ?>">
		  <span><i class="<?php echo (isset($rs['style']) && ($rs['style'] !== '')?$rs['style']:'fa fa-leaf'); ?>"></i></span>
		  <em><?php echo $rs['name']; ?></em>
		</a>
	  </li>
	  <?php endforeach; endif; else: echo "" ;endif; ?>
  </ul>
 <?php if(!val('hidedownapp')): ?>
  <div onclick="window.location.href='<?php echo val('appurl')?tempdir(val('appurl')):'/app.apk'; ?>'" class="footer_app_xz">
	 <?php echo val('title4')?:'点击下载APP，可享受更多权益'; ?>
  </div>
  <?php endif; ?>
  <div class="guanbi"><i class="si si-close"></i></div>
</div>
<script type="text/javascript">
var center_obj = $(".footmenu_warp .centers");
if( center_obj.length>0 && center_obj.find(".icons").length>0 ){
	center_obj.click(function(){
		if($(".footer_tc_dc").is(':hidden')){
			$('.footer_tc_show,.footer_tc_dc').fadeIn();
		}else{
			$('.footer_tc_show,.footer_tc_dc').fadeOut();
		}
	}).find(".menu2").remove();
}

$(document).ready(function(){
    $('.footer_tc_show .guanbi,.footer_tc_dc').on('click', function(){
        $('.footer_tc_show,.footer_tc_dc').fadeOut();
    });

	setTimeout(function(){	//仿原生APP, 获取API需要时间的
		if(typeof(window.inApk)=='object' || typeof(api)=='object'){	//在APP中就隐藏下载APP的提示
			 $('.footer_app_xz').hide();
		}
	},1000);
});

</script>
<?php endif; ?>
<!--弹窗结束-->

<script type="text/javascript">
if(window.self!=window.top){
	$(".footmenu_warp").hide();	//在框架里，就不要显示底部菜单
}
$(".footmenu_warp .menu1").click(function() {
    if ($(this).hasClass("showSons")) {
        $(this).children(".menu2").hide(); //当前菜单下的二级菜单隐藏
        $(".footmenu_warp .menu1").removeClass("showSons"); //同一级的菜单项
    } else {
        $(".footmenu_warp .menu1").removeClass("showSons"); //移除所有的样式
        $(this).addClass("showSons"); //给当前菜单添加特定样式
        $(".footmenu_warp .menu1").children(".menu2").slideUp("fast"); //隐藏所有的二级菜单
        $(this).children(".menu2").slideDown("fast"); //展示当前的二级菜单
    }
});
</script>